export default { PowerSelect, PowerExport, PowerDelete, PowerAction, PowerUpdate, PowerAdd, PowerEnable };
//权限 查询
function PowerSelect(power, menucode) {
    if (power == "-1") {
        return true;
    }
    if (menucode == undefined || menucode == "") {
        return false;
    }
    return power.indexOf(menucode + ".Select") > -1;
}
//权限 导出
function PowerExport(power, menucode) {
    if (power == "-1") {
        return true;
    }
    if (menucode == undefined || menucode == "") {
        return false;
    }
    return power.indexOf(menucode + ".Export") > -1;
}

//权限 删除
function PowerDelete(power, menucode) {
    if (power == "-1") {
        return true;
    }
    if (menucode == undefined || menucode == "") {
        return false;
    }
    return power.indexOf(menucode + ".Delete") > -1;
}
//权限 操作员
function PowerAction(power, menucode) {
    if (power == "-1") {
        return true;
    }
    if (menucode == undefined || menucode == "") {
        return false;
    }
    return power.indexOf(menucode + ".Action") > -1;
}
//权限 修改
function PowerUpdate(power, menucode) {
    if (power == "-1") {
        return true;
    }
    if (menucode == undefined || menucode == "") {
        return false;
    }
    return power.indexOf(menucode + ".Update") > -1;
}
//权限 新增
function PowerAdd(power, menucode) {
    if (power == "-1") {
        return true;
    }
    if (menucode == undefined || menucode == "") {
        return false;
    }
    return power.indexOf(menucode + ".Add") > -1;
}
//权限 启用 禁用
function PowerEnable(power, menucode) {
    if (menucode == "AuthBZ.FlowEdit") {
    }
    if (power == "-1") {
        return true;
    }
    if (menucode == undefined || menucode == "") {
        return false;
    }
    return power.indexOf(menucode + ".Enable") > -1;
}
